<?php
class Proyecto extends AppModel {
	var $name = 'Proyecto';
	var $useDbConfig = 'operaciones';
	var $validate = array(
		'id' => array(
			'multiple' => array(
				'rule' => array('multiple'),
				'message' => '* Campo requerido',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => '* Campo requerido',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'ppgerencia_id' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => '* Campo requerido',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'nm_proyecto' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => '* Campo requerido',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'coordinacione_id' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => '* Campo requerido',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);
	//The Associations below have been created with all possible keys, those that are not needed can be removed

	var $belongsTo = array(
		'Ppgerencia' => array(
			'className' => 'Ppgerencia',
			'foreignKey' => 'ppgerencia_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Gerencia' => array(
			'className' => 'Gerencia',
			'foreignKey' => 'gerencia_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Coordinacione' => array(
			'className' => 'Coordinacione',
			'foreignKey' => 'coordinacione_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $hasMany = array(
		'Servrealizado' => array(
			'className' => 'Servrealizado',
			'foreignKey' => 'proyecto_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Ordene' => array(
			'className' => 'Ordene',
			'foreignKey' => 'proyecto_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Acta' => array(
			'className' => 'Acta',
			'foreignKey' => 'proyecto_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
?>